using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace BMC.ARSystem
{
	[ARStructTypeInfo(Name = "AREnumLimitStruct", NumberOfMembers = 2u), ClassInterface, Guid("cf4f7f48-e05a-4130-879c-980089b8c2e8"), ProgId("BMC.ARSystem.SelectionLimit")]
	public class SelectionLimit : Limit
	{
		[Guid("f86c4e39-ec32-4e8e-bcde-07e5875ed05b")]
		public enum LimitStyle
		{
			Regular = 1,
			Custom
		}
		[ARStructMemTypeInfo(Name = "listStyle", Offset = 0u)]
		private SelectionLimit.LimitStyle _listStyle;
		[ARStructMemTypeInfo(Name = "values", Offset = 1u)]
		private ArrayList _values;
		public SelectionLimit.LimitStyle Style
		{
			get
			{
				return this._listStyle;
			}
			set
			{
				this._listStyle = value;
			}
		}
		public ArrayList Values
		{
			get
			{
				return this._values;
			}
			set
			{
				this._values = value;
			}
		}
		public SelectionLimit()
		{
		}
		internal SelectionLimit(object[] rawData, Server server) : base(rawData, server)
		{
		}
		internal static SelectionLimit createInstance(object[] rawData, Server server)
		{
			SelectionLimit selectionLimit = new SelectionLimit();
			SelectionLimit arg_1A_0 = selectionLimit;
			int[] indexSpec = new int[1];
			arg_1A_0.Style = (SelectionLimit.LimitStyle)Convert.ToUInt32(Util.GetAt(rawData, indexSpec));
			ArrayList values = null;
			switch (selectionLimit.Style)
			{
			case SelectionLimit.LimitStyle.Regular:
				values = ARTypeMgr.Instance.ArrayListFromVariant(Type.GetType("Unknown"), (object[])Util.GetAt(rawData, new int[]
				{
					1
				}), server);
				break;
			case SelectionLimit.LimitStyle.Custom:
				values = ARTypeMgr.Instance.ArrayListFromVariant(Type.GetType("Unknown"), (object[])Util.GetAt(rawData, new int[]
				{
					1
				}), server);
				break;
			}
			selectionLimit.Values = values;
			return selectionLimit;
		}
	}
}
